home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume16 / gnuplot2.02 / patch3 < prev    next >
Encoding:
Internet Message Format  |  1991-01-05  |  58.1 KB

  1. From: rjl@monu1.cc.monash.edu.au (Russell Lang)
  2. Newsgroups: comp.sources.misc
  3. Subject: v16i013:  Gnuplot 2.0 patch 2, 3 of 7
  4. Message-ID: <1991Jan5.035620.2423@sparky.IMD.Sterling.COM>
  5. Date: 5 Jan 91 03:56:20 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: 060f2a81 086ef8e1 3da1f1ad 743efc30
  8.  
  9. Submitted-by: Russell Lang <rjl@monu1.cc.monash.edu.au>
  10. Posting-number: Volume 16, Issue 13
  11. Archive-name: gnuplot2.02/patch3
  12. Patch-To: gnuplot2.0: Volume 11, Issue 65-79
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then unpack
  16. # it by saving it into a file and typing "sh file".  To overwrite existing
  17. # files, type "sh file -c".  You can also feed this as standard input via
  18. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  19. # will see the following message at the end:
  20. #        "End of shell archive."
  21. # Contents:  patch2b
  22. # Wrapped by eln272v@monu1 on Wed Dec 19 11:57:31 1990
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. if test -f patch2b -a "${1}" != "-c" ; then 
  25.   echo shar: Will not over-write existing file \"patch2b\"
  26. else
  27. echo shar: Extracting \"patch2b\" \(56728 characters\)
  28. sed "s/^X//" >patch2b <<'END_OF_patch2b'
  29. Xdiff -cr ./bitmap.c ../gnuplot2.02/bitmap.c
  30. X*** ./bitmap.c    Mon Dec  3 15:32:30 1990
  31. X--- ../gnuplot2.02/bitmap.c    Thu Dec  6 16:08:08 1990
  32. X***************
  33. X*** 0
  34. X
  35. X--- 1,1051 -----
  36. X+ /* GNUPLOT - bitmap.c */
  37. X+ /*
  38. X+  * Copyright (C) 1990
  39. X+  *
  40. X+  * Permission to use, copy, and distribute this software and its
  41. X+  * documentation for any purpose with or without fee is hereby granted,
  42. X+  * provided that the above copyright notice appear in all copies and
  43. X+  * that both that copyright notice and this permission notice appear
  44. X+  * in supporting documentation.
  45. X+  *
  46. X+  * Permission to modify the software is granted, but not the right to
  47. X+  * distribute the modified code.  Modifications are to be distributed
  48. X+  * as patches to released version.
  49. X+  *
  50. X+  * This software  is provided "as is" without express or implied warranty.
  51. X+  *
  52. X+  *
  53. X+  * AUTHORS
  54. X+  *  Jyrki Yli-Nokari <jty@intrin.UUCP>
  55. X+  *  Ronald J. Hartranft <rjh2@ns.cc.lehigh.edu>
  56. X+  *  Russell Lang <rjl@monu1.cc.monash.edu.au>
  57. X+  *
  58. X+  * send your comments or suggestions to (pixar!info-gnuplot@sun.com).
  59. X+  *
  60. X+  */
  61. X+ 
  62. X+ /*
  63. X+ ** General raster plotting routines.
  64. X+ ** Raster routines written and copyrighted 1987 by
  65. X+ ** Jyrki Yli-Nokari (jty@intrin.UUCP)
  66. X+ ** Intrinsic, Ltd.
  67. X+ **
  68. X+ ** You may use this code for anything you like as long as
  69. X+ ** you are not selling it and the credit is given and
  70. X+ ** this message retained.
  71. X+ **
  72. X+ */
  73. X+ 
  74. X+ /* Bitmap plotting routines derived from above raster plotting routines
  75. X+  * Russell Lang, 1990
  76. X+  */
  77. X+ 
  78. X+ #include <stdio.h>
  79. X+ #include "plot.h"
  80. X+ #include "bitmap.h"
  81. X+ 
  82. X+ bitmap *b_p = (bitmap *)NULL;    /* global pointer to bitmap */
  83. X+ unsigned int b_currx, b_curry;    /* the current coordinates */
  84. X+ unsigned int b_xsize, b_ysize;    /* the size of the bitmap */
  85. X+ unsigned int b_planes;            /* number of color planes */
  86. X+ unsigned int b_psize;            /* size of each plane */
  87. X+ unsigned int b_rastermode;        /* raster mode rotates -90deg */
  88. X+ unsigned int b_linemask = 0xffff;    /* 16 bit mask for dotted lines */
  89. X+ unsigned int b_value = 1;        /* colour of lines */
  90. X+ unsigned int b_hchar;            /* width of characters */
  91. X+ unsigned int b_hbits;            /* actual bits in char horizontally */
  92. X+ unsigned int b_vchar;            /* height of characters */
  93. X+ unsigned int b_vbits;            /* actual bits in char vertically */
  94. X+ unsigned int b_angle;            /* rotation of text */
  95. X+ char_box b_font[FNT_CHARS];        /* the current font */
  96. X+ unsigned int b_pattern[] = {0xffff, 0x1111,
  97. X+     0xffff, 0x5555, 0x3333, 0x7777, 0x3f3f, 0x0f0f, 0x5f5f};
  98. X+ int b_maskcount = 0;
  99. X+ unsigned int b_lastx, b_lasty;    /* last pixel set - used by b_line */
  100. X+ 
  101. X+ #define IN(i,size)  ((unsigned)i < (unsigned)size)
  102. X+ 
  103. X+ /* 5x9 font, bottom row first, left pixel in lsb */
  104. X+ char_row fnt5x9[FNT_CHARS][FNT5X9_VBITS] = {
  105. X+   /* */  {000000,000000,000000,000000,000000,000000,000000,000000,000000},
  106. X+   /*!*/  {000000,000000,0x0004,000000,0x0004,0x0004,0x0004,0x0004,0x0004},
  107. X+   /*"*/  {000000,000000,000000,000000,000000,000000,0x000a,0x000a,0x000a},
  108. X+   /*#*/  {000000,000000,0x000a,0x000a,0x001f,0x000a,0x001f,0x000a,0x000a},
  109. X+   /*$*/  {000000,000000,0x0004,0x000f,0x0014,0x000e,0x0005,0x001e,0x0004},
  110. X+   /*%*/  {000000,000000,0x0018,0x0019,0x0002,0x0004,0x0008,0x0013,0x0003},
  111. X+   /*&*/  {000000,000000,0x0016,0x0009,0x0015,0x0002,0x0005,0x0005,0x0002},
  112. X+   /*'*/  {000000,000000,000000,000000,000000,0x0002,0x0004,0x0006,0x0006},
  113. X+   /*(*/  {000000,000000,0x0008,0x0004,0x0002,0x0002,0x0002,0x0004,0x0008},
  114. X+   /*)*/  {000000,000000,0x0002,0x0004,0x0008,0x0008,0x0008,0x0004,0x0002},
  115. X+   /***/  {000000,000000,0x0004,0x0015,0x000e,0x001f,0x000e,0x0015,0x0004},
  116. X+   /*+*/  {000000,000000,000000,0x0004,0x0004,0x001f,0x0004,0x0004,000000},
  117. X+   /*,*/  {000000,0x0002,0x0004,0x0006,0x0006,000000,000000,000000,000000},
  118. X+   /*-*/  {000000,000000,000000,000000,000000,0x001f,000000,000000,000000},
  119. X+   /*.*/  {000000,000000,0x0006,0x0006,000000,000000,000000,000000,000000},
  120. X+   /*-/-*/{000000,000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,000000},
  121. X+   /*0*/  {000000,000000,0x000e,0x0011,0x0013,0x0015,0x0019,0x0011,0x000e},
  122. X+   /*1*/  {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0006,0x0004},
  123. X+   /*2*/  {000000,000000,0x001f,0x0001,0x0001,0x000e,0x0010,0x0011,0x000e},
  124. X+   /*3*/  {000000,000000,0x000e,0x0011,0x0010,0x000c,0x0010,0x0011,0x000e},
  125. X+   /*4*/  {000000,000000,0x0008,0x0008,0x001f,0x0009,0x000a,0x000c,0x0008},
  126. X+   /*5*/  {000000,000000,0x000e,0x0011,0x0010,0x0010,0x000f,0x0001,0x001f},
  127. X+   /*6*/  {000000,000000,0x000e,0x0011,0x0011,0x000f,0x0001,0x0002,0x000c},
  128. X+   /*7*/  {000000,000000,0x0001,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f},
  129. X+   /*8*/  {000000,000000,0x000e,0x0011,0x0011,0x000e,0x0011,0x0011,0x000e},
  130. X+   /*9*/  {000000,000000,0x0006,0x0008,0x0010,0x001e,0x0011,0x0011,0x000e},
  131. X+   /*:*/  {000000,000000,000000,0x0006,0x0006,000000,0x0006,0x0006,000000},
  132. X+   /*;*/  {000000,0x0001,0x0002,0x0006,0x0006,000000,0x0006,0x0006,000000},
  133. X+   /*<*/  {000000,000000,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004,0x0008},
  134. X+   /*=*/  {000000,000000,000000,000000,0x001f,000000,0x001f,000000,000000},
  135. X+   /*>*/  {000000,000000,0x0002,0x0004,0x0008,0x0010,0x0008,0x0004,0x0002},
  136. X+   /*?*/  {000000,000000,0x0004,000000,0x0004,0x0008,0x0010,0x0011,0x000e},
  137. X+   /*@*/  {000000,000000,0x000e,0x0015,0x0015,0x0016,0x0010,0x0011,0x000e},
  138. X+   /*A*/  {000000,000000,0x0011,0x0011,0x001f,0x0011,0x0011,0x000a,0x0004},
  139. X+   /*B*/  {000000,000000,0x000f,0x0012,0x0012,0x000e,0x0012,0x0012,0x000f},
  140. X+   /*C*/  {000000,000000,0x000e,0x0011,0x0001,0x0001,0x0001,0x0011,0x000e},
  141. X+   /*D*/  {000000,000000,0x000f,0x0012,0x0012,0x0012,0x0012,0x0012,0x000f},
  142. X+   /*E*/  {000000,000000,0x001f,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f},
  143. X+   /*F*/  {000000,000000,0x0001,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f},
  144. X+   /*G*/  {000000,000000,0x001e,0x0011,0x0011,0x0019,0x0001,0x0001,0x001e},
  145. X+   /*H*/  {000000,000000,0x0011,0x0011,0x0011,0x001f,0x0011,0x0011,0x0011},
  146. X+   /*I*/  {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x000e},
  147. X+   /*J*/  {000000,000000,0x000e,0x0011,0x0010,0x0010,0x0010,0x0010,0x0010},
  148. X+   /*K*/  {000000,000000,0x0011,0x0009,0x0005,0x0003,0x0005,0x0009,0x0011},
  149. X+   /*L*/  {000000,000000,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  150. X+   /*M*/  {000000,000000,0x0011,0x0011,0x0011,0x0015,0x0015,0x001b,0x0011},
  151. X+   /*N*/  {000000,000000,0x0011,0x0011,0x0011,0x0019,0x0015,0x0013,0x0011},
  152. X+   /*O*/  {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x000e},
  153. X+   /*P*/  {000000,000000,0x0001,0x0001,0x0001,0x000f,0x0011,0x0011,0x000f},
  154. X+   /*Q*/  {000000,0x0018,0x000e,0x0015,0x0011,0x0011,0x0011,0x0011,0x000e},
  155. X+   /*R*/  {000000,000000,0x0011,0x0009,0x0005,0x000f,0x0011,0x0011,0x000f},
  156. X+   /*S*/  {000000,000000,0x000e,0x0011,0x0010,0x000e,0x0001,0x0011,0x000e},
  157. X+   /*T*/  {000000,000000,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x001f},
  158. X+   /*U*/  {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x0011},
  159. X+   /*V*/  {000000,000000,0x0004,0x0004,0x000a,0x000a,0x0011,0x0011,0x0011},
  160. X+   /*W*/  {000000,000000,0x0011,0x001b,0x0015,0x0011,0x0011,0x0011,0x0011},
  161. X+   /*X*/  {000000,000000,0x0011,0x0011,0x000a,0x0004,0x000a,0x0011,0x0011},
  162. X+   /*Y*/  {000000,000000,0x0004,0x0004,0x0004,0x0004,0x000a,0x0011,0x0011},
  163. X+   /*Z*/  {000000,000000,0x001f,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f},
  164. X+   /*[*/  {000000,000000,0x000e,0x0002,0x0002,0x0002,0x0002,0x0002,0x000e},
  165. X+   /*\*/  {000000,000000,000000,0x0010,0x0008,0x0004,0x0002,0x0001,000000},
  166. X+   /*]*/  {000000,000000,0x000e,0x0008,0x0008,0x0008,0x0008,0x0008,0x000e},
  167. X+   /*^*/  {000000,000000,000000,000000,000000,000000,0x0011,0x000a,0x0004},
  168. X+   /*_*/  {000000,000000,0x001f,000000,000000,000000,000000,000000,000000},
  169. X+   /*`*/  {000000,000000,000000,000000,000000,0x0008,0x0004,0x000c,0x000c},
  170. X+   /*a*/  {000000,000000,0x001e,0x0011,0x001e,0x0010,0x000e,000000,000000},
  171. X+   /*b*/  {000000,000000,0x000d,0x0013,0x0011,0x0013,0x000d,0x0001,0x0001},
  172. X+   /*c*/  {000000,000000,0x000e,0x0011,0x0001,0x0011,0x000e,000000,000000},
  173. X+   /*d*/  {000000,000000,0x0016,0x0019,0x0011,0x0019,0x0016,0x0010,0x0010},
  174. X+   /*e*/  {000000,000000,0x000e,0x0001,0x001f,0x0011,0x000e,000000,000000},
  175. X+   /*f*/  {000000,000000,0x0004,0x0004,0x0004,0x000e,0x0004,0x0014,0x0008},
  176. X+   /*g*/  {0x000e,0x0011,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000},
  177. X+   /*h*/  {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,0x0001,0x0001},
  178. X+   /*i*/  {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0006,000000,0x0004},
  179. X+   /*j*/  {0x0006,0x0009,0x0008,0x0008,0x0008,0x0008,0x000c,000000,0x0008},
  180. X+   /*k*/  {000000,000000,0x0009,0x0005,0x0003,0x0005,0x0009,0x0001,0x0001},
  181. X+   /*l*/  {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x0006},
  182. X+   /*m*/  {000000,000000,0x0015,0x0015,0x0015,0x0015,0x000b,000000,000000},
  183. X+   /*n*/  {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,000000,000000},
  184. X+   /*o*/  {000000,000000,0x000e,0x0011,0x0011,0x0011,0x000e,000000,000000},
  185. X+   /*p*/  {0x0001,0x0001,0x000d,0x0013,0x0011,0x0013,0x000d,000000,000000},
  186. X+   /*q*/  {0x0010,0x0010,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000},
  187. X+   /*r*/  {000000,000000,0x0001,0x0001,0x0001,0x0013,0x000d,000000,000000},
  188. X+   /*s*/  {000000,000000,0x000f,0x0010,0x000e,0x0001,0x001e,000000,000000},
  189. X+   /*t*/  {000000,000000,0x0008,0x0014,0x0004,0x0004,0x001f,0x0004,0x0004},
  190. X+   /*u*/  {000000,000000,0x0016,0x0019,0x0011,0x0011,0x0011,000000,000000},
  191. X+   /*v*/  {000000,000000,0x0004,0x000a,0x0011,0x0011,0x0011,000000,000000},
  192. X+   /*w*/  {000000,000000,0x000a,0x0015,0x0015,0x0011,0x0011,000000,000000},
  193. X+   /*x*/  {000000,000000,0x0011,0x000a,0x0004,0x000a,0x0011,000000,000000},
  194. X+   /*y*/  {0x000e,0x0010,0x001e,0x0011,0x0011,0x0011,0x0011,000000,000000},
  195. X+   /*z*/  {000000,000000,0x001f,0x0002,0x0004,0x0008,0x001f,000000,000000},
  196. X+   /*{*/  {000000,000000,0x0008,0x0004,0x0004,0x0002,0x0004,0x0004,0x0008},
  197. X+   /*|*/  {000000,000000,0x0004,0x0004,0x0004,000000,0x0004,0x0004,0x0004},
  198. X+   /*}*/  {000000,000000,0x0002,0x0004,0x0004,0x0008,0x0004,0x0004,0x0002},
  199. X+   /*~*/  {000000,000000,000000,000000,000000,000000,0x0008,0x0015,0x0002},
  200. X+   /*DEL*/{000000,000000,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f},
  201. X+ };
  202. X+ 
  203. X+ /* 9x17 font, bottom row first, left pixel in lsb */
  204. X+ char_row fnt9x17[FNT_CHARS][FNT9X17_VBITS] = {
  205. X+   /* */  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  206. X+           000000,000000,000000,000000,000000,000000,000000,000000},
  207. X+   /*!*/  {000000,000000,000000,000000,0x0010,000000,000000,000000,0x0010,
  208. X+           0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010},
  209. X+   /*"*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  210. X+           000000,000000,000000,0x0044,0x0044,0x0044,0x0044,0x0044},
  211. X+   /*#*/  {000000,000000,000000,000000,0x0044,0x0044,0x0044,0x0044,0x01ff,
  212. X+           0x0044,0x0044,0x0044,0x01ff,0x0044,0x0044,0x0044,0x0044},
  213. X+   /*$*/  {000000,000000,000000,000000,0x0010,0x0010,0x007e,0x0091,0x0110,
  214. X+           0x0090,0x007c,0x0012,0x0011,0x0112,0x00fc,0x0010,0x0010},
  215. X+   /*%*/  {000000,000000,000000,000000,0x0080,0x0141,0x0081,0x0002,0x0004,
  216. X+           0x0008,0x0010,0x0020,0x0040,0x0080,0x0102,0x0105,0x0002},
  217. X+   /*&*/  {000000,000000,000000,000000,0x011c,0x00a2,0x0041,0x00c1,0x0141,
  218. X+           0x0022,0x001c,0x0014,0x0022,0x0022,0x001c,000000,000000},
  219. X+   /*'*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  220. X+           000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010},
  221. X+   /*(*/  {000000,000000,000000,000000,0x0040,0x0020,0x0010,0x0008,0x0008,
  222. X+           0x0004,0x0004,0x0004,0x0008,0x0008,0x0010,0x0020,0x0040},
  223. X+   /*)*/  {000000,000000,000000,000000,0x0004,0x0008,0x0010,0x0020,0x0020,
  224. X+           0x0040,0x0040,0x0040,0x0020,0x0020,0x0010,0x0008,0x0004},
  225. X+   /***/  {000000,000000,000000,000000,0x0010,0x0010,0x0111,0x0092,0x0054,
  226. X+           0x0038,0x01ff,0x0038,0x0054,0x0092,0x0111,0x0010,0x0010},
  227. X+   /*+*/  {000000,000000,000000,000000,000000,000000,0x0010,0x0010,0x0010,
  228. X+           0x0010,0x01ff,0x0010,0x0010,0x0010,0x0010,000000,000000},
  229. X+   /*,*/  {000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010,000000,
  230. X+           000000,000000,000000,000000,000000,000000,000000,000000},
  231. X+   /*-*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  232. X+           000000,0x01ff,000000,000000,000000,000000,000000,000000},
  233. X+   /*.*/  {000000,000000,000000,000000,0x0010,0x0038,0x0010,000000,000000,
  234. X+           000000,000000,000000,000000,000000,000000,000000,000000},
  235. X+   /*-/-*/{000000,000000,000000,000000,000000,000000,0x0001,0x0002,0x0004,
  236. X+           0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,000000,000000},
  237. X+   /*0*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0103,0x0105,
  238. X+           0x0109,0x0111,0x0121,0x0141,0x0181,0x0101,0x0082,0x007c},
  239. X+   /*1*/  {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010,
  240. X+           0x0010,0x0010,0x0010,0x0010,0x0010,0x001c,0x0018,0x0010},
  241. X+   /*2*/  {000000,000000,000000,000000,0x01ff,0x0001,0x0001,0x0001,0x0001,
  242. X+           0x0002,0x007c,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c},
  243. X+   /*3*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100,
  244. X+           0x0080,0x0078,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c},
  245. X+   /*4*/  {000000,000000,000000,000000,0x0040,0x0040,0x0040,0x0040,0x0040,
  246. X+           0x01ff,0x0041,0x0042,0x0044,0x0048,0x0050,0x0060,0x0040},
  247. X+   /*5*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100,
  248. X+           0x0100,0x0080,0x007f,0x0001,0x0001,0x0001,0x0001,0x01ff},
  249. X+   /*6*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  250. X+           0x0081,0x007f,0x0001,0x0001,0x0001,0x0002,0x0084,0x0078},
  251. X+   /*7*/  {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0002,0x0004,
  252. X+           0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0100,0x01ff},
  253. X+   /*8*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  254. X+           0x0082,0x007c,0x0082,0x0101,0x0101,0x0101,0x0082,0x007c},
  255. X+   /*9*/  {000000,000000,000000,000000,0x001c,0x0022,0x0040,0x0080,0x0100,
  256. X+           0x0100,0x01fc,0x0102,0x0101,0x0101,0x0101,0x0082,0x007c},
  257. X+   /*:*/  {000000,000000,000000,000000,000000,000000,0x0010,0x0038,0x0010,
  258. X+           000000,000000,000000,0x0010,0x0038,0x0010,000000,000000},
  259. X+   /*;*/  {000000,000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010,
  260. X+           000000,000000,000000,0x0010,0x0038,0x0010,000000,000000},
  261. X+   /*<*/  {000000,000000,000000,000000,0x0040,0x0020,0x0010,0x0008,0x0004,
  262. X+           0x0002,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040},
  263. X+   /*=*/  {000000,000000,000000,000000,000000,000000,000000,000000,0x01ff,
  264. X+           000000,000000,000000,0x01ff,000000,000000,000000,000000},
  265. X+   /*>*/  {000000,000000,000000,000000,0x0004,0x0008,0x0010,0x0020,0x0040,
  266. X+           0x0080,0x0100,0x0080,0x0040,0x0020,0x0010,0x0008,0x0004},
  267. X+   /*?*/  {000000,000000,000000,0x0010,0x0038,0x0010,000000,0x0010,0x0010,
  268. X+           0x0020,0x0040,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c},
  269. X+   /*@*/  {000000,000000,000000,000000,0x007c,0x0002,0x0001,0x01f9,0x0145,
  270. X+           0x0145,0x0145,0x0179,0x0101,0x0101,0x0101,0x0082,0x007c},
  271. X+   /*A*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x01ff,
  272. X+           0x0101,0x0082,0x0082,0x0044,0x0044,0x0028,0x0028,0x0010},
  273. X+   /*B*/  {000000,000000,000000,000000,0x007f,0x0084,0x0104,0x0104,0x0104,
  274. X+           0x0084,0x007c,0x0084,0x0104,0x0104,0x0104,0x0084,0x007f},
  275. X+   /*C*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0001,0x0001,
  276. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0101,0x0082,0x007c},
  277. X+   /*D*/  {000000,000000,000000,000000,0x007f,0x0084,0x0104,0x0104,0x0104,
  278. X+           0x0104,0x0104,0x0104,0x0104,0x0104,0x0104,0x0084,0x007f},
  279. X+   /*E*/  {000000,000000,000000,000000,0x01ff,0x0001,0x0001,0x0001,0x0001,
  280. X+           0x0001,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x01ff},
  281. X+   /*F*/  {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001,
  282. X+           0x0001,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x01ff},
  283. X+   /*G*/  {000000,000000,000000,000000,0x00fc,0x0102,0x0101,0x0101,0x0101,
  284. X+           0x0101,0x01c1,0x0001,0x0001,0x0001,0x0001,0x0102,0x00fc},
  285. X+   /*H*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101,
  286. X+           0x0101,0x01ff,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101},
  287. X+   /*I*/  {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010,
  288. X+           0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x007c},
  289. X+   /*J*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100,
  290. X+           0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0180},
  291. X+   /*K*/  {000000,000000,000000,000000,0x0101,0x0081,0x0041,0x0021,0x0011,
  292. X+           0x0009,0x0005,0x000b,0x0011,0x0021,0x0041,0x0081,0x0101},
  293. X+   /*L*/  {000000,000000,000000,000000,0x01ff,0x0101,0x0001,0x0001,0x0001,
  294. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  295. X+   /*M*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101,
  296. X+           0x0101,0x0111,0x0111,0x0129,0x0145,0x0145,0x0183,0x0101},
  297. X+   /*N*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0181,0x0141,
  298. X+           0x0141,0x0121,0x0111,0x0109,0x0105,0x0105,0x0103,0x0101},
  299. X+   /*O*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  300. X+           0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0082,0x007c},
  301. X+   /*P*/  {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001,
  302. X+           0x0001,0x007f,0x0081,0x0101,0x0101,0x0101,0x0081,0x007f},
  303. X+   /*Q*/  {000000,000000,0x0180,0x0040,0x007c,0x0092,0x0101,0x0101,0x0101,
  304. X+           0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0082,0x007c},
  305. X+   /*R*/  {000000,000000,000000,000000,0x0101,0x0081,0x0041,0x0021,0x0011,
  306. X+           0x0009,0x007f,0x0081,0x0101,0x0101,0x0101,0x0081,0x007f},
  307. X+   /*S*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100,
  308. X+           0x0080,0x007c,0x0002,0x0001,0x0001,0x0101,0x0082,0x007c},
  309. X+   /*T*/  {000000,000000,000000,000000,0x0038,0x0010,0x0010,0x0010,0x0010,
  310. X+           0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0111,0x01ff},
  311. X+   /*U*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  312. X+           0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101},
  313. X+   /*V*/  {000000,000000,000000,000000,0x0010,0x0010,0x0028,0x0028,0x0044,
  314. X+           0x0044,0x0082,0x0082,0x0101,0x0101,0x0101,0x0101,0x0101},
  315. X+   /*W*/  {000000,000000,000000,000000,0x0101,0x0183,0x0145,0x0145,0x0129,
  316. X+           0x0111,0x0111,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101},
  317. X+   /*X*/  {000000,000000,000000,000000,0x0101,0x0101,0x0082,0x0082,0x0044,
  318. X+           0x0028,0x0010,0x0028,0x0044,0x0082,0x0082,0x0101,0x0101},
  319. X+   /*Y*/  {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010,
  320. X+           0x0010,0x0010,0x0028,0x0044,0x0082,0x0082,0x0101,0x0101},
  321. X+   /*Z*/  {000000,000000,000000,000000,0x01ff,0x0001,0x0002,0x0002,0x0004,
  322. X+           0x0008,0x0010,0x0020,0x0040,0x0080,0x0080,0x0100,0x01ff},
  323. X+   /*[*/  {000000,000000,000000,000000,0x007c,0x0004,0x0004,0x0004,0x0004,
  324. X+           0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x007c},
  325. X+   /*\*/  {000000,000000,000000,000000,000000,000000,0x0100,0x0080,0x0040,
  326. X+           0x0020,0x0010,0x0008,0x0004,0x0002,0x0001,000000,000000},
  327. X+   /*]*/  {000000,000000,000000,000000,0x007c,0x0040,0x0040,0x0040,0x0040,
  328. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x007c},
  329. X+   /*^*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  330. X+           000000,000000,000000,0x0101,0x0082,0x0044,0x0028,0x0010},
  331. X+   /*_*/  {000000,000000,000000,000000,0x01ff,000000,000000,000000,000000,
  332. X+           000000,000000,000000,000000,000000,000000,000000,000000},
  333. X+   /*`*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  334. X+           000000,000000,0x0020,0x0010,0x0008,0x000c,0x001c,0x0008},
  335. X+   /*a*/  {000000,000000,000000,000000,0x03fc,0x0102,0x0101,0x0102,0x01fc,
  336. X+           0x0100,0x0100,0x0080,0x007c,000000,000000,000000,000000},
  337. X+   /*b*/  {000000,000000,000000,000000,0x007d,0x0083,0x0101,0x0101,0x0101,
  338. X+           0x0101,0x0101,0x0083,0x007d,0x0001,0x0001,0x0001,0x0001},
  339. X+   /*c*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0001,0x0001,
  340. X+           0x0001,0x0101,0x0082,0x007c,000000,000000,000000,000000},
  341. X+   /*d*/  {000000,000000,000000,000000,0x017c,0x0182,0x0101,0x0101,0x0101,
  342. X+           0x0101,0x0101,0x0182,0x017c,0x0100,0x0100,0x0100,0x0100},
  343. X+   /*e*/  {000000,000000,000000,000000,0x007c,0x0002,0x0001,0x0001,0x01ff,
  344. X+           0x0101,0x0101,0x0082,0x007c,000000,000000,000000,000000},
  345. X+   /*f*/  {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010,
  346. X+           0x0010,0x007c,0x0010,0x0010,0x0010,0x0110,0x00a0,0x0040},
  347. X+   /*g*/  {0x007c,0x0082,0x0101,0x0100,0x017c,0x0182,0x0101,0x0101,0x0101,
  348. X+           0x0101,0x0101,0x0182,0x017c,000000,000000,000000,000000},
  349. X+   /*h*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101,
  350. X+           0x0103,0x0103,0x0085,0x0079,0x0001,0x0001,0x0001,0x0001},
  351. X+   /*i*/  {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010,
  352. X+           0x0010,0x0010,0x0018,000000,000000,0x0018,0x0018,000000},
  353. X+   /*j*/  {0x003c,0x0042,0x0081,0x0080,0x0080,0x0080,0x0080,0x0080,0x0080,
  354. X+           0x0080,0x0080,0x00c0,000000,000000,0x00c0,0x00c0,000000},
  355. X+   /*k*/  {000000,000000,000000,000000,0x0082,0x0042,0x0022,0x0012,0x000a,
  356. X+           0x0016,0x0022,0x0042,0x0002,0x0002,0x0002,0x0002,0x0002},
  357. X+   /*l*/  {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010,
  358. X+           0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x001c},
  359. X+   /*m*/  {000000,000000,000000,000000,0x0111,0x0111,0x0111,0x0111,0x0111,
  360. X+           0x0111,0x0111,0x00ab,0x0045,000000,000000,000000,000000},
  361. X+   /*n*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101,
  362. X+           0x0101,0x0101,0x0083,0x007d,000000,000000,000000,000000},
  363. X+   /*o*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  364. X+           0x0101,0x0101,0x0082,0x007c,000000,000000,000000,000000},
  365. X+   /*p*/  {0x0001,0x0001,0x0001,0x0001,0x007d,0x0003,0x0081,0x0101,0x0101,
  366. X+           0x0101,0x0101,0x0083,0x007d,000000,000000,000000,000000},
  367. X+   /*q*/  {0x0100,0x0100,0x0100,0x0100,0x017c,0x0182,0x0101,0x0101,0x0101,
  368. X+           0x0101,0x0101,0x0182,0x017c,000000,000000,000000,000000},
  369. X+   /*r*/  {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001,
  370. X+           0x0001,0x0103,0x0085,0x0079,000000,000000,000000,000000},
  371. X+   /*s*/  {000000,000000,000000,000000,0x007e,0x0081,0x0100,0x0080,0x007c,
  372. X+           0x0002,0x0001,0x0102,0x00fc,000000,000000,000000,000000},
  373. X+   /*t*/  {000000,000000,000000,000000,0x0040,0x00a0,0x0110,0x0010,0x0010,
  374. X+           0x0010,0x0010,0x0010,0x00fe,0x0010,0x0010,0x0010,0x0010},
  375. X+   /*u*/  {000000,000000,000000,000000,0x013c,0x0142,0x0181,0x0101,0x0101,
  376. X+           0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000},
  377. X+   /*v*/  {000000,000000,000000,000000,0x0010,0x0028,0x0044,0x0082,0x0101,
  378. X+           0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000},
  379. X+   /*w*/  {000000,000000,000000,000000,0x0044,0x00aa,0x0111,0x0111,0x0101,
  380. X+           0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000},
  381. X+   /*x*/  {000000,000000,000000,000000,0x0101,0x0082,0x0044,0x0028,0x0010,
  382. X+           0x0028,0x0044,0x0082,0x0101,000000,000000,000000,000000},
  383. X+   /*y*/  {0x007c,0x0082,0x0101,0x0100,0x0100,0x01fc,0x0102,0x0101,0x0101,
  384. X+           0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000},
  385. X+   /*z*/  {000000,000000,000000,000000,0x01ff,0x0002,0x0004,0x0008,0x0010,
  386. X+           0x0020,0x0040,0x0080,0x01ff,000000,000000,000000,000000},
  387. X+   /*{*/  {000000,000000,000000,000000,0x00c0,0x0020,0x0010,0x0010,0x0010,
  388. X+           0x0008,0x0004,0x0008,0x0010,0x0010,0x0010,0x0020,0x00c0},
  389. X+   /*|*/  {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010,
  390. X+           000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010},
  391. X+   /*}*/  {000000,000000,000000,000000,0x0006,0x0008,0x0010,0x0010,0x0010,
  392. X+           0x0020,0x0040,0x0020,0x0010,0x0010,0x0010,0x0008,0x0006},
  393. X+   /*~*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  394. X+           000000,000000,000000,0x0040,0x00a0,0x0111,0x000a,0x0004},
  395. X+   /*DEL*/{000000,000000,000000,000000,0x0155,000000,0x0155,000000,0x0155,
  396. X+           000000,0x0155,000000,0x0155,000000,0x0155,000000,0x0155},
  397. X+ };
  398. X+ 
  399. X+ /* 13x25 font, bottom row first, left pixel in lsb */
  400. X+ char_row fnt13x25[FNT_CHARS][FNT13X25_VBITS] = {
  401. X+   /* */  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  402. X+           000000,000000,000000,000000,000000,000000,000000,000000,000000,
  403. X+           000000,000000,000000,000000,000000,000000,000000},
  404. X+   /*!*/  {000000,000000,000000,000000,000000,0x00e0,0x00e0,0x00e0,000000,
  405. X+           000000,000000,0x0040,0x0040,0x0040,0x0040,0x0040,0x00e0,0x00e0,
  406. X+           0x00e0,0x00e0,0x00e0,0x00e0,0x00e0,0x00e0,0x0040},
  407. X+   /*"*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  408. X+           000000,000000,000000,000000,000000,000000,000000,000000,000000,
  409. X+           0x0208,0x0208,0x0208,0x0208,0x0208,0x0208,0x0208},
  410. X+   /*#*/  {000000,000000,000000,000000,000000,000000,0x0208,0x0208,0x0208,
  411. X+           0x0208,0x0208,0x0208,0x1fff,0x0208,0x0208,0x0208,0x0208,0x0208,
  412. X+           0x1fff,0x0208,0x0208,0x0208,0x0208,0x0208,0x0208},
  413. X+   /*$*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  414. X+           0x03f8,0x0444,0x0842,0x0840,0x0840,0x0440,0x03f8,0x0044,0x0042,
  415. X+           0x0042,0x0842,0x0444,0x03f8,0x0040,0x0040,0x0040},
  416. X+   /*%*/  {000000,000000,000000,000000,000000,000000,0x0c00,0x1200,0x1201,
  417. X+           0x0c01,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
  418. X+           0x0200,0x0400,0x0800,0x1006,0x1009,0x0009,0x0006},
  419. X+   /*&*/  {000000,000000,000000,000000,000000,000000,0x1078,0x1084,0x0902,
  420. X+           0x0601,0x0601,0x0901,0x1081,0x0042,0x0024,0x0018,0x0018,0x0024,
  421. X+           0x0042,0x0042,0x0042,0x0042,0x0024,0x0018,000000},
  422. X+   /*'*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  423. X+           000000,000000,000000,000000,000000,0x0001,0x0002,0x0004,0x0008,
  424. X+           0x0010,0x0030,0x0078,0x0078,0x0078,0x0030,000000},
  425. X+   /*(*/  {000000,000000,000000,000000,000000,000000,0x0080,0x0040,0x0020,
  426. X+           0x0020,0x0010,0x0008,0x0008,0x0004,0x0004,0x0004,0x0004,0x0004,
  427. X+           0x0008,0x0008,0x0010,0x0020,0x0020,0x0040,0x0080},
  428. X+   /*)*/  {000000,000000,000000,000000,000000,000000,0x0020,0x0040,0x0080,
  429. X+           0x0080,0x0100,0x0200,0x0200,0x0400,0x0400,0x0400,0x0400,0x0400,
  430. X+           0x0200,0x0200,0x0100,0x0080,0x0080,0x0040,0x0020},
  431. X+   /***/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  432. X+           0x1041,0x0842,0x0444,0x0248,0x0150,0x00e0,0x1fff,0x00e0,0x0150,
  433. X+           0x0248,0x0444,0x0842,0x1041,0x0040,0x0040,0x0040},
  434. X+   /*+*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  435. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x1fff,0x0040,0x0040,
  436. X+           0x0040,0x0040,0x0040,0x0040,000000,000000,000000},
  437. X+   /*,*/  {000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0030,0x0078,
  438. X+           0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000,
  439. X+           000000,000000,000000,000000,000000,000000,000000},
  440. X+   /*-*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  441. X+           000000,000000,000000,000000,000000,000000,0x1fff,000000,000000,
  442. X+           000000,000000,000000,000000,000000,000000,000000},
  443. X+   /*.*/  {000000,000000,000000,000000,000000,000000,000000,0x0038,0x007c,
  444. X+           0x007c,0x007c,0x0038,000000,000000,000000,000000,000000,000000,
  445. X+           000000,000000,000000,000000,000000,000000,000000},
  446. X+   /*-/-*/{000000,000000,000000,000000,000000,000000,000000,000000,0x0001,
  447. X+           0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
  448. X+           0x0200,0x0400,0x0800,0x1000,0x1000,000000,000000},
  449. X+   /*0*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  450. X+           0x1001,0x1003,0x1005,0x1009,0x1011,0x1021,0x1041,0x1081,0x1101,
  451. X+           0x1201,0x1401,0x1801,0x1001,0x0802,0x0404,0x03f8},
  452. X+   /*1*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040,
  453. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  454. X+           0x0040,0x0040,0x0040,0x0048,0x0070,0x0060,0x0040},
  455. X+   /*2*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001,
  456. X+           0x0001,0x0001,0x0001,0x0001,0x0002,0x03fc,0x0400,0x0800,0x1000,
  457. X+           0x1000,0x1000,0x1000,0x1001,0x0802,0x0404,0x03f8},
  458. X+   /*3*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  459. X+           0x1001,0x1000,0x1000,0x1000,0x0800,0x0400,0x03e0,0x0400,0x0800,
  460. X+           0x1000,0x1000,0x1000,0x1001,0x0802,0x0404,0x03f8},
  461. X+   /*4*/  {000000,000000,000000,000000,000000,000000,0x0200,0x0200,0x0200,
  462. X+           0x0200,0x0200,0x0200,0x0200,0x1fff,0x0201,0x0201,0x0202,0x0204,
  463. X+           0x0208,0x0210,0x0220,0x0240,0x0280,0x0300,0x0200},
  464. X+   /*5*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  465. X+           0x1001,0x1000,0x1000,0x1000,0x1000,0x1000,0x0800,0x0400,0x03ff,
  466. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff},
  467. X+   /*6*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  468. X+           0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff,0x0001,0x0001,
  469. X+           0x0001,0x0001,0x0002,0x0004,0x0808,0x0410,0x03e0},
  470. X+   /*7*/  {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001,
  471. X+           0x0002,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
  472. X+           0x0200,0x0400,0x0800,0x0800,0x1000,0x1000,0x1fff},
  473. X+   /*8*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  474. X+           0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8,0x0404,0x0802,
  475. X+           0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  476. X+   /*9*/  {000000,000000,000000,000000,000000,000000,0x00f8,0x0104,0x0202,
  477. X+           0x0400,0x0800,0x1000,0x1000,0x1000,0x1000,0x1ff8,0x1004,0x1002,
  478. X+           0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  479. X+   /*:*/  {000000,000000,000000,000000,000000,000000,000000,000000,0x0030,
  480. X+           0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000,
  481. X+           0x0030,0x0078,0x0078,0x0030,000000,000000,000000},
  482. X+   /*;*/  {000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0030,0x0078,
  483. X+           0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000,
  484. X+           0x0030,0x0078,0x0078,0x0030,000000,000000,000000},
  485. X+   /*<*/  {000000,000000,000000,000000,000000,000000,0x0200,0x0100,0x0080,
  486. X+           0x0040,0x0020,0x0010,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004,
  487. X+           0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200},
  488. X+   /*=*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  489. X+           000000,000000,000000,0x1fff,000000,000000,000000,000000,000000,
  490. X+           0x1fff,000000,000000,000000,000000,000000,000000},
  491. X+   /*>*/  {000000,000000,000000,000000,000000,000000,0x0008,0x0010,0x0020,
  492. X+           0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,0x1000,0x0800,0x0400,
  493. X+           0x0200,0x0100,0x0080,0x0040,0x0020,0x0010,0x0008},
  494. X+   /*?*/  {000000,000000,000000,000000,000000,0x0040,0x00e0,0x0040,000000,
  495. X+           000000,000000,0x0040,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,
  496. X+           0x1000,0x1000,0x1001,0x1001,0x0802,0x0404,0x03f8},
  497. X+   /*@*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0002,
  498. X+           0x0001,0x0001,0x0ee1,0x1111,0x1111,0x1111,0x1111,0x1111,0x12e1,
  499. X+           0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  500. X+   /*A*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  501. X+           0x1001,0x1001,0x1001,0x1fff,0x1001,0x1001,0x1001,0x1001,0x0802,
  502. X+           0x0802,0x0404,0x0208,0x0110,0x00a0,0x00a0,0x0040},
  503. X+   /*B*/  {000000,000000,000000,000000,000000,000000,0x03ff,0x0408,0x0808,
  504. X+           0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03f8,0x0408,0x0808,
  505. X+           0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03ff},
  506. X+   /*C*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  507. X+           0x1001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,
  508. X+           0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,0x03f8},
  509. X+   /*D*/  {000000,000000,000000,000000,000000,000000,0x03ff,0x0408,0x0808,
  510. X+           0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,
  511. X+           0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03ff},
  512. X+   /*E*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001,
  513. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x007f,0x0001,0x0001,
  514. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff},
  515. X+   /*F*/  {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001,
  516. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x007f,0x0001,0x0001,
  517. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff},
  518. X+   /*G*/  {000000,000000,000000,000000,000000,000000,0x0ff8,0x1004,0x1002,
  519. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1f01,0x0001,0x0001,
  520. X+           0x0001,0x0001,0x0001,0x0001,0x0002,0x1004,0x0ff8},
  521. X+   /*H*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  522. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1fff,0x1001,0x1001,
  523. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001},
  524. X+   /*I*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040,
  525. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  526. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x03f8},
  527. X+   /*J*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  528. X+           0x1001,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
  529. X+           0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1e00},
  530. X+   /*K*/  {000000,000000,000000,000000,000000,000000,0x1001,0x0801,0x0401,
  531. X+           0x0201,0x0101,0x0081,0x0041,0x0021,0x0011,0x000f,0x0009,0x0011,
  532. X+           0x0021,0x0041,0x0081,0x0101,0x0201,0x0401,0x0801},
  533. X+   /*L*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x1001,0x1001,
  534. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,
  535. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  536. X+   /*M*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  537. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1041,0x1041,0x10a1,
  538. X+           0x10a1,0x1111,0x1209,0x1209,0x1405,0x1803,0x1001},
  539. X+   /*N*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  540. X+           0x1001,0x1801,0x1401,0x1201,0x1201,0x1101,0x1081,0x1041,0x1041,
  541. X+           0x1021,0x1011,0x1009,0x1009,0x1005,0x1003,0x1001},
  542. X+   /*O*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  543. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  544. X+           0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  545. X+   /*P*/  {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001,
  546. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x03ff,0x0401,0x0801,
  547. X+           0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff},
  548. X+   /*Q*/  {000000,000000,000000,000000,0x0c00,0x0200,0x03f8,0x0494,0x0862,
  549. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  550. X+           0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  551. X+   /*R*/  {000000,000000,000000,000000,000000,000000,0x1001,0x0801,0x0401,
  552. X+           0x0201,0x0101,0x0081,0x0041,0x0021,0x0011,0x03ff,0x0401,0x0801,
  553. X+           0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff},
  554. X+   /*S*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  555. X+           0x1001,0x1000,0x1000,0x1000,0x0800,0x0400,0x03f8,0x0004,0x0002,
  556. X+           0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,0x03f8},
  557. X+   /*T*/  {000000,000000,000000,000000,000000,000000,0x00e0,0x0040,0x0040,
  558. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  559. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x1041,0x1fff},
  560. X+   /*U*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  561. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  562. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001},
  563. X+   /*V*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x00a0,
  564. X+           0x00a0,0x0110,0x0110,0x0208,0x0208,0x0404,0x0404,0x0802,0x0802,
  565. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001},
  566. X+   /*W*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1803,
  567. X+           0x1405,0x1405,0x1209,0x1209,0x1111,0x1111,0x10a1,0x1041,0x1001,
  568. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001},
  569. X+   /*X*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  570. X+           0x0802,0x0802,0x0404,0x0208,0x0110,0x00a0,0x0040,0x00a0,0x0110,
  571. X+           0x0208,0x0404,0x0802,0x0802,0x1001,0x1001,0x1001},
  572. X+   /*Y*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  573. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x00a0,0x0110,0x0208,
  574. X+           0x0404,0x0802,0x0802,0x1001,0x1001,0x1001,0x1001},
  575. X+   /*Z*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001,
  576. X+           0x0002,0x0004,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
  577. X+           0x0200,0x0400,0x0400,0x0800,0x1000,0x1000,0x1fff},
  578. X+   /*[*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0008,0x0008,
  579. X+           0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,
  580. X+           0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x03f8},
  581. X+   /*\*/  {000000,000000,000000,000000,000000,000000,000000,000000,0x1000,
  582. X+           0x1000,0x0800,0x0400,0x0200,0x0100,0x0080,0x0040,0x0020,0x0010,
  583. X+           0x0008,0x0004,0x0002,0x0001,0x0001,000000,000000},
  584. X+   /*]*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0200,0x0200,
  585. X+           0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,
  586. X+           0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x03f8},
  587. X+   /*^*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  588. X+           000000,000000,000000,000000,000000,000000,000000,000000,000000,
  589. X+           0x1001,0x0802,0x0404,0x0208,0x0110,0x00a0,0x0040},
  590. X+   /*_*/  {000000,000000,000000,000000,000000,000000,0x1fff,000000,000000,
  591. X+           000000,000000,000000,000000,000000,000000,000000,000000,000000,
  592. X+           000000,000000,000000,000000,000000,000000,000000},
  593. X+   /*`*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  594. X+           000000,000000,000000,000000,000000,0x0400,0x0200,0x0100,0x0080,
  595. X+           0x0040,0x0060,0x00f0,0x00f0,0x00f0,0x0060,000000},
  596. X+   /*a*/  {000000,000000,000000,000000,000000,000000,0x17f8,0x0804,0x0802,
  597. X+           0x0802,0x0802,0x0804,0x0ff8,0x0800,0x0800,0x0800,0x0800,0x0404,
  598. X+           0x03f8,000000,000000,000000,000000,000000,000000},
  599. X+   /*b*/  {000000,000000,000000,000000,000000,000000,0x03f9,0x0405,0x0803,
  600. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405,
  601. X+           0x03f9,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  602. X+   /*c*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  603. X+           0x1001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,
  604. X+           0x03f8,000000,000000,000000,000000,000000,000000},
  605. X+   /*d*/  {000000,000000,000000,000000,000000,000000,0x13f8,0x1404,0x1802,
  606. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404,
  607. X+           0x13f8,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000},
  608. X+   /*e*/  {000000,000000,000000,000000,000000,000000,0x0ff8,0x0004,0x0002,
  609. X+           0x0001,0x0001,0x0001,0x1fff,0x1001,0x1001,0x1001,0x0802,0x0404,
  610. X+           0x03f8,000000,000000,000000,000000,000000,000000},
  611. X+   /*f*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  612. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x03f8,0x0040,0x0040,
  613. X+           0x0040,0x0040,0x0040,0x1040,0x0880,0x0500,0x0200},
  614. X+   /*g*/  {0x03f8,0x0404,0x0802,0x1001,0x1000,0x1000,0x13f8,0x1404,0x1802,
  615. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404,
  616. X+           0x13f8,000000,000000,000000,000000,000000,000000},
  617. X+   /*h*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  618. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405,
  619. X+           0x03f9,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  620. X+   /*i*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040,
  621. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0070,
  622. X+           000000,000000,000000,0x00e0,0x00e0,0x00e0,000000},
  623. X+   /*j*/  {0x00f0,0x0108,0x0204,0x0402,0x0400,0x0400,0x0400,0x0400,0x0400,
  624. X+           0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0700,
  625. X+           000000,000000,000000,0x0700,0x0700,0x0700,000000},
  626. X+   /*k*/  {000000,000000,000000,000000,000000,000000,0x0804,0x0404,0x0204,
  627. X+           0x0104,0x0084,0x0044,0x0024,0x0014,0x002c,0x0044,0x0084,0x0104,
  628. X+           0x0204,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004},
  629. X+   /*l*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040,
  630. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  631. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0070},
  632. X+   /*m*/  {000000,000000,000000,000000,000000,000000,0x1041,0x1041,0x1041,
  633. X+           0x1041,0x1041,0x1041,0x1041,0x1041,0x1041,0x1041,0x08a3,0x0515,
  634. X+           0x0209,000000,000000,000000,000000,000000,000000},
  635. X+   /*n*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  636. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405,
  637. X+           0x03f9,000000,000000,000000,000000,000000,000000},
  638. X+   /*o*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  639. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,
  640. X+           0x03f8,000000,000000,000000,000000,000000,000000},
  641. X+   /*p*/  {0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x03f9,0x0405,0x0803,
  642. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405,
  643. X+           0x03f9,000000,000000,000000,000000,000000,000000},
  644. X+   /*q*/  {0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x13f8,0x1404,0x1802,
  645. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404,
  646. X+           0x13f8,000000,000000,000000,000000,000000,000000},
  647. X+   /*r*/  {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001,
  648. X+           0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1001,0x0803,0x0405,
  649. X+           0x03f9,000000,000000,000000,000000,000000,000000},
  650. X+   /*s*/  {000000,000000,000000,000000,000000,000000,0x03fc,0x0402,0x0800,
  651. X+           0x0800,0x0800,0x0400,0x03f8,0x0004,0x0002,0x0002,0x0002,0x0804,
  652. X+           0x07f8,000000,000000,000000,000000,000000,000000},
  653. X+   /*t*/  {000000,000000,000000,000000,000000,000000,0x0200,0x0500,0x0880,
  654. X+           0x1040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  655. X+           0x07fc,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040},
  656. X+   /*u*/  {000000,000000,000000,000000,000000,000000,0x13f8,0x1404,0x1802,
  657. X+           0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  658. X+           0x1001,000000,000000,000000,000000,000000,000000},
  659. X+   /*v*/  {000000,000000,000000,000000,000000,000000,0x0040,0x00a0,0x0110,
  660. X+           0x0208,0x0404,0x0802,0x0802,0x1001,0x1001,0x1001,0x1001,0x1001,
  661. X+           0x1001,000000,000000,000000,000000,000000,000000},
  662. X+   /*w*/  {000000,000000,000000,000000,000000,000000,0x0208,0x0514,0x08a2,
  663. X+           0x08a2,0x1041,0x1041,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  664. X+           0x1001,000000,000000,000000,000000,000000,000000},
  665. X+   /*x*/  {000000,000000,000000,000000,000000,000000,0x1001,0x0802,0x0404,
  666. X+           0x0208,0x0110,0x00a0,0x0040,0x00a0,0x0110,0x0208,0x0404,0x0802,
  667. X+           0x1001,000000,000000,000000,000000,000000,000000},
  668. X+   /*y*/  {0x03f8,0x0404,0x0802,0x1001,0x1000,0x1000,0x1000,0x1000,0x1ff8,
  669. X+           0x1004,0x1002,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  670. X+           0x1001,000000,000000,000000,000000,000000,000000},
  671. X+   /*z*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x0002,0x0004,
  672. X+           0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,
  673. X+           0x1fff,000000,000000,000000,000000,000000,000000},
  674. X+   /*{*/  {000000,000000,000000,000000,000000,000000,0x0600,0x0100,0x0080,
  675. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0020,0x0010,0x0020,0x0040,
  676. X+           0x0040,0x0040,0x0040,0x0040,0x0080,0x0100,0x0600},
  677. X+   /*|*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  678. X+           0x0040,0x0040,0x0040,0x0040,000000,000000,000000,000000,000000,
  679. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040},
  680. X+   /*}*/  {000000,000000,000000,000000,000000,000000,0x000c,0x0010,0x0020,
  681. X+           0x0040,0x0040,0x0040,0x0040,0x0040,0x0080,0x0100,0x0080,0x0040,
  682. X+           0x0040,0x0040,0x0040,0x0040,0x0020,0x0010,0x000c},
  683. X+   /*~*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  684. X+           000000,000000,000000,000000,000000,000000,000000,000000,000000,
  685. X+           0x0600,0x0900,0x1080,0x1041,0x0021,0x0012,0x000c},
  686. X+   /*DEL*/{000000,000000,000000,000000,000000,000000,0x1249,000000,000000,
  687. X+           0x1249,000000,000000,0x1249,000000,000000,0x1249,000000,000000,
  688. X+           0x1249,000000,000000,0x1249,000000,000000,0x1249},
  689. X+ };
  690. X+ 
  691. X+ /*
  692. X+ ** The plotting area is defined as a huge bitmap.
  693. X+ ** The bitmap is stored in a dynamically allocated pixel array b_p
  694. X+ **
  695. X+ ** The bitmap is allocated (and initialized to zero) with
  696. X+ ** b_makebitmap(xsize, ysize, planes)
  697. X+ ** and freed with b_freebitmap()
  698. X+ ** xsize and ysize will be rounded up to a multiple of 8.
  699. X+ **
  700. X+ ** Valid (int) coordinates range from zero to (xsize-1,ysize-1)
  701. X+ **
  702. X+ ** Plotting is done via b_move(x, y) and b_vector(x, y) functions,
  703. X+ ** where the point (x,y) is the target to go from the current point
  704. X+ ** To set the color use b_setvalue(value) where value is the value 
  705. X+ ** (0 or 1 or a color number) to be stored in every pixel.
  706. X+ ** To get dotted line styles, use b_setlinetype(linetype).
  707. X+ **
  708. X+ ** Internally all plotting goes through b_setpixel(x, y, value).
  709. X+ */
  710. X+ 
  711. X+ 
  712. X+ /*
  713. X+ ** set pixel (x, y, value) to value value (this can be 1/0 or a color number).
  714. X+ */
  715. X+ void
  716. X+ b_setpixel(x, y, value)
  717. X+ unsigned int x, y, value;
  718. X+ {
  719. X+   register unsigned int row;
  720. X+   register unsigned char mask;
  721. X+   int i;
  722. X+   if (b_rastermode) {
  723. X+     /* interchange so that new (x,y) is old (y,b_ysize-1-x) */
  724. X+     row = x;  /* temp storage */
  725. X+     x = y;
  726. X+     y = b_ysize-1-row;
  727. X+   }
  728. X+   if (IN(x, b_xsize) && IN(y, b_ysize))
  729. X+   {
  730. X+     row = y/8;
  731. X+     mask = 1<<(y%8);
  732. X+ 
  733. X+     for (i=0; i<b_planes; i++) {
  734. X+         if (value&1)
  735. X+             *((*b_p)[row]+x) |= mask;
  736. X+         else
  737. X+             *((*b_p)[row]+x) &= ~mask;
  738. X+         row += b_psize;
  739. X+         value >>= 1;
  740. X+     }
  741. X+   }
  742. X+ #ifdef BITMAPDEBUG
  743. X+   else
  744. X+   {
  745. X+     if (b_rastermode)
  746. X+       fprintf(stderr, "Warning: setpixel(%d, %d, %d) out of bounds\n", 
  747. X+         b_ysize-1-y, x, value);
  748. X+     else
  749. X+       fprintf(stderr, "Warning: setpixel(%d, %d, %d) out of bounds\n",
  750. X+         x, y, value);
  751. X+   }
  752. X+ #endif
  753. X+ }
  754. X+ 
  755. X+ /*
  756. X+ ** get pixel (x,y) value----unused
  757. X+ */
  758. X+ /****************************
  759. X+ unsigned int
  760. X+ b_getpixel(x, y)
  761. X+ unsigned int x, y;
  762. X+ {
  763. X+   register unsigned int row;
  764. X+   register unsigned char mask;
  765. X+   register unsigned char value;
  766. X+   int i;
  767. X+ 
  768. X+   if (b_rastermode) {
  769. X+     row = x;
  770. X+     x = y;
  771. X+     y = b_ysize-1-row;
  772. X+   }
  773. X+   if (IN(x, b_xsize) && IN(y, b_ysize))
  774. X+   {
  775. X+     row = y/8 + (b_planes-1)*b_psize;
  776. X+     mask = 1<<(y%8);
  777. X+ 
  778. X+     for (i=0; i<b_planes; i++) {
  779. X+         if ( *((*b_p)[row]+x) & mask )
  780. X+             value |= 1;
  781. X+         row -= b_psize;
  782. X+         value <<= 1;
  783. X+     }
  784. X+     return(value);
  785. X+   }
  786. X+   else
  787. X+   {
  788. X+ #ifdef BITMAPDEBUG
  789. X+     if (b_rastermode)
  790. X+       fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n",
  791. X+         b_ysize-1-y, x);
  792. X+     else
  793. X+       fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n", x, y);
  794. X+ #endif
  795. X+     return(0);
  796. X+   }
  797. X+ }
  798. X+ ********************************/
  799. X+ 
  800. X+ /*
  801. X+ ** allocate the bitmap
  802. X+ */
  803. X+ void
  804. X+ b_makebitmap(x, y, planes)
  805. X+ unsigned int x, y, planes;
  806. X+ {
  807. X+   register unsigned j;
  808. X+   unsigned rows;
  809. X+ 
  810. X+   x = 8 * (unsigned int)(x/8.0+0.9);    /* round up to multiple of 8 */
  811. X+   y = 8 * (unsigned int)(y/8.0+0.9);    /* round up to multiple of 8 */
  812. X+   b_psize = y/8;                    /* size of each plane */
  813. X+   rows = b_psize * planes;            /* total number of rows of 8 pixels high */
  814. X+   b_xsize = x; b_ysize = y;
  815. X+   b_currx = b_curry = 0;
  816. X+   b_planes = planes;
  817. X+   b_value = 1;
  818. X+   b_angle = 0;
  819. X+   b_rastermode = 0;
  820. X+   /* allocate row pointers */
  821. X+   b_p = (bitmap *)alloc( rows * sizeof(pixels *), "bitmap row buffer");
  822. X+   bzero(b_p, rows * sizeof(pixels *));
  823. X+   for (j = 0; j < rows; j++) {
  824. X+     /* allocate bitmap buffers */
  825. X+     (*b_p)[j] = (pixels *)alloc(x * sizeof(pixels),(char *)NULL);
  826. X+     if ((*b_p)[j] == (pixels *)NULL) {
  827. X+         b_freebitmap();  /* free what we have already allocated */
  828. X+         int_error("out of memory for bitmap buffer", NO_CARET);
  829. X+     }
  830. X+     bzero((*b_p)[j], x * sizeof(pixels));
  831. X+   }
  832. X+ }
  833. X+   
  834. X+ /*
  835. X+ ** free the allocated bitmap
  836. X+ */
  837. X+ void
  838. X+ b_freebitmap()
  839. X+ {
  840. X+   int j;
  841. X+   unsigned rows;
  842. X+ 
  843. X+   rows = b_psize * b_planes;   /* total number of rows of 8 pixels high */
  844. X+   for (j = 0; j < rows; j++)
  845. X+   {
  846. X+     (void) free((char *)(*b_p)[j]);
  847. X+   }
  848. X+   (void) free((char *)b_p);
  849. X+   b_p = (bitmap *)(NULL);
  850. X+ }
  851. X+ 
  852. X+ /*
  853. X+ ** set pixel at (x,y) with color b_value and dotted mask b_linemask.
  854. X+ */
  855. X+ void
  856. X+ b_setmaskpixel(x,y,value)
  857. X+ unsigned int x,y,value;
  858. X+ {
  859. X+     /* dotted line generator */
  860. X+     if ((b_linemask>>b_maskcount)&(unsigned int)(1)) {
  861. X+         b_setpixel(x,y,value);
  862. X+     }
  863. X+     b_maskcount= (b_maskcount+1) % 16;
  864. X+     b_lastx= x;  /* last pixel set with mask */
  865. X+     b_lasty= y;
  866. X+ }
  867. X+ 
  868. X+ /*
  869. X+ ** draw a line from (x1,y1) to (x2,y2)
  870. X+ ** with color b_value and dotted mask b_linemask.
  871. X+ */
  872. X+ void
  873. X+ b_line(x1,y1,x2,y2)
  874. X+ unsigned int x1,y1,x2,y2;
  875. X+ {
  876. X+ int runcount;
  877. X+ int dx,dy;
  878. X+ int xinc,yinc;
  879. X+ unsigned int xplot,yplot;
  880. X+ 
  881. X+     runcount=0;
  882. X+     dx = abs((int)(x1)-(int)(x2));
  883. X+     if (x2>x1)  xinc=  1;
  884. X+     if (x2==x1) xinc=  0;
  885. X+     if (x2<x1)  xinc= -1;
  886. X+     dy = abs((int)(y1)-(int)(y2));
  887. X+     if (y2>y1)  yinc=  1;
  888. X+     if (y2==y1) yinc=  0;
  889. X+     if (y2<y1)  yinc= -1;
  890. X+     xplot=x1;
  891. X+     yplot=y1;
  892. X+     if (dx>dy) {
  893. X+         /* iterate x */
  894. X+         if ( (b_linemask==0xffff) ||
  895. X+             ((xplot!=b_lastx) && (yplot!=b_lasty)) )
  896. X+             b_setmaskpixel(xplot,yplot,b_value);
  897. X+         while (xplot!=x2) {
  898. X+             xplot+=xinc;
  899. X+             runcount+=dy;
  900. X+             if (runcount>=(dx-runcount)) {
  901. X+                 yplot+=yinc;
  902. X+                 runcount-=dx;
  903. X+             }
  904. X+             b_setmaskpixel(xplot,yplot,b_value);
  905. X+         }
  906. X+     } else {
  907. X+         /* iterate y */
  908. X+         if ( (b_linemask==0xffff) ||
  909. X+             ((xplot!=b_lastx) && (yplot!=b_lasty)) )
  910. X+             b_setmaskpixel(xplot,yplot,b_value);
  911. X+         while (yplot!=y2) {
  912. X+             yplot+=yinc;
  913. X+             runcount+=dx;
  914. X+             if (runcount>=(dy-runcount)) {
  915. X+                 xplot+=xinc;
  916. X+                 runcount-=dy;
  917. X+             }
  918. X+             b_setmaskpixel(xplot,yplot,b_value);
  919. X+         }
  920. X+     }
  921. X+ }
  922. X+ 
  923. X+ /*
  924. X+ ** set character size
  925. X+ */
  926. X+ void
  927. X+ b_charsize(size)
  928. X+ unsigned int size;
  929. X+ {
  930. X+     int j;
  931. X+     switch(size) {
  932. X+         case FNT5X9:
  933. X+             b_hchar = FNT5X9_HCHAR;
  934. X+             b_hbits = FNT5X9_HBITS;
  935. X+             b_vchar = FNT5X9_VCHAR;
  936. X+             b_vbits = FNT5X9_VBITS;
  937. X+             for (j = 0; j < FNT_CHARS; j++ )
  938. X+                 b_font[j] = &fnt5x9[j][0];
  939. X+             break;
  940. X+         case FNT9X17:
  941. X+             b_hchar = FNT9X17_HCHAR;
  942. X+             b_hbits = FNT9X17_HBITS;
  943. X+             b_vchar = FNT9X17_VCHAR;
  944. X+             b_vbits = FNT9X17_VBITS;
  945. X+             for (j = 0; j < FNT_CHARS; j++ )
  946. X+                 b_font[j] = &fnt9x17[j][0];
  947. X+             break;
  948. X+         case FNT13X25:
  949. X+             b_hchar = FNT13X25_HCHAR;
  950. X+             b_hbits = FNT13X25_HBITS;
  951. X+             b_vchar = FNT13X25_VCHAR;
  952. X+             b_vbits = FNT13X25_VBITS;
  953. X+             for (j = 0; j < FNT_CHARS; j++ )
  954. X+                 b_font[j] = &fnt13x25[j][0];
  955. X+             break;
  956. X+         default:
  957. X+             int_error("Unknown character size",NO_CARET);
  958. X+     }
  959. X+ }
  960. X+ 
  961. X+ 
  962. X+ /*
  963. X+ ** put characater c at (x,y) rotated by angle with color b_value.
  964. X+ */
  965. X+ void
  966. X+ b_putc(x,y,c,angle)
  967. X+ unsigned int x,y;
  968. X+ char c;
  969. X+ unsigned int angle;
  970. X+ {
  971. X+     unsigned int i, j, k;
  972. X+     char_row fc;
  973. X+ 
  974. X+     j = c - ' ';
  975. X+     for ( i = 0; i < b_vbits; i++ ) {
  976. X+         fc = *( b_font[j] + i );
  977. X+         if ( c == '_' ) {    /* treat underline specially */
  978. X+             if ( fc  ) {    /* this this the underline row ? *?
  979. X+                 /* draw the under line for the full h_char width */
  980. X+                 for ( k = ( b_hbits - b_hchar )/2;
  981. X+                     k < ( b_hbits + b_hchar )/2; k++ ) {
  982. X+                     switch(angle) {
  983. X+                         case 0 : b_setpixel(x+k+1,y+i,b_value);
  984. X+                             break;
  985. X+                         case 1 : b_setpixel(x-i,y+k+1,b_value);
  986. X+                             break;
  987. X+                     }
  988. X+                 }
  989. X+             }
  990. X+         }
  991. X+         else {
  992. X+             /* draw character */
  993. X+             for ( k = 0; k < b_hbits; k++ ) {
  994. X+                 if ( ( fc >> k ) & 1 ) {
  995. X+                     switch(angle) {
  996. X+                         case 0 : b_setpixel(x+k+1,y+i,b_value);
  997. X+                             break;
  998. X+                         case 1 : b_setpixel(x-i,y+k+1,b_value);
  999. X+                             break;
  1000. X+                     }
  1001. X+                 }
  1002. X+             }
  1003. X+         }
  1004. X+     }
  1005. X+ }
  1006. X+ 
  1007. X+ 
  1008. X+ /*
  1009. X+ ** set b_linemask to b_pattern[linetype]
  1010. X+ */
  1011. X+ int
  1012. X+ b_setlinetype(linetype)
  1013. X+ int linetype;
  1014. X+ {
  1015. X+     if (linetype>=7)
  1016. X+         linetype %= 7;
  1017. X+     b_linemask = b_pattern[linetype+2];
  1018. X+     b_maskcount=0;
  1019. X+ }
  1020. X+ 
  1021. X+ /*
  1022. X+ ** set b_value to value
  1023. X+ */
  1024. X+ void
  1025. X+ b_setvalue(value)
  1026. X+ unsigned int value;
  1027. X+ {
  1028. X+     b_value = value;
  1029. X+ }
  1030. X+ 
  1031. X+ /*
  1032. X+ ** move to (x,y)
  1033. X+ */
  1034. X+ int
  1035. X+ b_move(x, y)
  1036. X+ unsigned int x, y;
  1037. X+ {
  1038. X+   b_currx = x;
  1039. X+   b_curry = y;
  1040. X+ }
  1041. X+ 
  1042. X+ /*
  1043. X+ ** draw to (x,y) with color b_value
  1044. X+ */
  1045. X+ int
  1046. X+ b_vector(x, y)
  1047. X+ unsigned int x, y;
  1048. X+ {
  1049. X+   b_line(b_currx, b_curry, x, y);
  1050. X+   b_currx = x;
  1051. X+   b_curry = y;
  1052. X+ }
  1053. X+ 
  1054. X+ 
  1055. X+ /*
  1056. X+ ** put text str at (x,y) with color b_value and rotation b_angle
  1057. X+ */
  1058. X+ int
  1059. X+ b_put_text(x,y,str)
  1060. X+ unsigned int x, y;
  1061. X+ char *str;
  1062. X+ {
  1063. X+     if (b_angle == 1)
  1064. X+         x += b_vchar/2;
  1065. X+     else
  1066. X+         y -= b_vchar/2;
  1067. X+    switch (b_angle) {
  1068. X+       case 0:
  1069. X+      for (; *str; ++str, x += b_hchar)
  1070. X+         b_putc (x, y, *str, b_angle);
  1071. X+                     break;
  1072. X+       case 1:
  1073. X+      for (; *str; ++str, y += b_hchar)
  1074. X+         b_putc (x, y, *str, b_angle);
  1075. X+                     break;
  1076. X+     }
  1077. X+ }
  1078. X+ 
  1079. X+ 
  1080. X+ int
  1081. X+ b_text_angle(ang)
  1082. X+ int ang;
  1083. X+ {
  1084. X+     b_angle=(unsigned int)ang;
  1085. X+     return TRUE;
  1086. X+ }
  1087. Xdiff -cr ./bitmap.h ../gnuplot2.02/bitmap.h
  1088. X*** ./bitmap.h    Mon Dec  3 15:32:34 1990
  1089. X--- ../gnuplot2.02/bitmap.h    Thu Dec  6 16:08:01 1990
  1090. X***************
  1091. X*** 0
  1092. X
  1093. X--- 1,68 -----
  1094. X+ /* bitmap.h */
  1095. X+ 
  1096. X+ /* allow up to 16 bit width for character array */
  1097. X+ typedef unsigned int char_row;
  1098. X+ typedef char_row * char_box;
  1099. X+ 
  1100. X+ #define FNT_CHARS   96      /* Number of characters in the font set */
  1101. X+ 
  1102. X+ #define FNT5X9 0
  1103. X+ #define FNT5X9_VCHAR 11 /* vertical spacing between characters */
  1104. X+ #define FNT5X9_VBITS 9 /* actual number of rows of bits per char */
  1105. X+ #define FNT5X9_HCHAR 7 /* horizontal spacing between characters */
  1106. X+ #define FNT5X9_HBITS 5 /* actual number of bits per row per char */
  1107. X+ extern char_row fnt5x9[FNT_CHARS][FNT5X9_VBITS];
  1108. X+ 
  1109. X+ #define FNT9X17 1
  1110. X+ #define FNT9X17_VCHAR 21 /* vertical spacing between characters */
  1111. X+ #define FNT9X17_VBITS 17 /* actual number of rows of bits per char */
  1112. X+ #define FNT9X17_HCHAR 13 /* horizontal spacing between characters */
  1113. X+ #define FNT9X17_HBITS 9 /* actual number of bits per row per char */
  1114. X+ extern char_row fnt9x17[FNT_CHARS][FNT9X17_VBITS];
  1115. X+ 
  1116. X+ #define FNT13X25 2
  1117. X+ #define FNT13X25_VCHAR 31 /* vertical spacing between characters */
  1118. X+ #define FNT13X25_VBITS 25 /* actual number of rows of bits per char */
  1119. X+ #define FNT13X25_HCHAR 19 /* horizontal spacing between characters */
  1120. X+ #define FNT13X25_HBITS 13 /* actual number of bits per row per char */
  1121. X+ extern char_row fnt13x25[FNT_CHARS][FNT13X25_VBITS];
  1122. X+ 
  1123. X+ 
  1124. X+ typedef unsigned char pixels;  /* the type of one set of 8 pixels in bitmap */
  1125. X+ typedef pixels *bitmap[];  /* the bitmap */
  1126. X+ 
  1127. X+ extern bitmap *b_p;                        /* global pointer to bitmap */
  1128. X+ extern unsigned int b_currx, b_curry;    /* the current coordinates */
  1129. X+ extern unsigned int b_xsize, b_ysize;    /* the size of the bitmap */
  1130. X+ extern unsigned int b_planes;            /* number of color planes */
  1131. X+ extern unsigned int b_psize;            /* size of each plane */
  1132. X+ extern unsigned int b_rastermode;        /* raster mode rotates -90deg */
  1133. X+ extern unsigned int b_linemask;            /* 16 bit mask for dotted lines */
  1134. X+ extern unsigned int b_value;            /* colour of lines */
  1135. X+ extern unsigned int b_hchar;            /* width of characters */
  1136. X+ extern unsigned int b_hbits;            /* actual bits in char horizontally */
  1137. X+ extern unsigned int b_vchar;            /* height of characters */
  1138. X+ extern unsigned int b_vbits;            /* actual bits in char vertically */
  1139. X+ extern unsigned int b_angle;            /* rotation of text */
  1140. X+ extern char_box b_font[FNT_CHARS];        /* the current font */
  1141. X+ extern unsigned int b_pattern[];
  1142. X+ extern int b_maskcount;
  1143. X+ extern unsigned int b_lastx, b_lasty;    /* last pixel set - used by b_line */
  1144. X+ 
  1145. X+ 
  1146. X+ extern void b_makebitmap();
  1147. X+ extern void b_freebitmap();
  1148. X+ extern void b_setpixel();
  1149. X+ extern unsigned int b_getpixel();
  1150. X+ extern void b_line();
  1151. X+ extern void b_setmaskpixel();
  1152. X+ extern void b_putc();
  1153. X+ extern void b_charsize();
  1154. X+ extern void b_setvalue();
  1155. X+ 
  1156. X+ extern int b_setlinetype();
  1157. X+ extern int b_move();
  1158. X+ extern int b_vector();
  1159. X+ extern int b_put_text();
  1160. X+ extern int b_text_angle();
  1161. X+ 
  1162. END_OF_patch2b
  1163. if test 56728 -ne `wc -c <patch2b`; then
  1164.     echo shar: \"patch2b\" unpacked with wrong size!
  1165. fi
  1166. # end of overwriting check
  1167. fi
  1168. echo shar: End of shell archive.
  1169. exit 0
  1170.  
  1171. exit 0 # Just in case...
  1172. -- 
  1173. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1174. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1175. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1176. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1177.